package com.example.black.myapplication.androidframwork;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import com.example.black.myapplication.R;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class MyViewPagerActivity extends AppCompatActivity {

    @BindView(R.id.lv1)
    ListView lv1;
    @BindView(R.id.lv2)
    ListView lv2;
    @BindView(R.id.lv3)
    ListView lv3;
    @BindView(R.id.lv4)
    ListView lv4;
    @BindView(R.id.lv5)
    ListView lv5;

    private ArrayAdapter<String> adapter;
    private static final String[] str = new String[]{"first", "second", "third", "fourth", "fifth"};

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_view_pager);
        ButterKnife.bind(this);
        List<String> list = new ArrayList<>(Arrays.asList(
                "1", "2", "3", "4", "5", "6"
        ));
        adapter = new ArrayAdapter<String>(this, R.layout.listitem, R.id.tv_name, list);
        lv1.setAdapter(adapter);
        lv2.setAdapter(adapter);
        lv3.setAdapter(adapter);
        lv4.setAdapter(adapter);
        lv5.setAdapter(adapter);

    }
}
